<template>
  <van-popup v-model="value" position="bottom">
    <van-picker
      show-toolbar
      :title="'请选择' + title"
      :columns="list"
      @confirm="handleconfirm"
      @cancel="$emit('input')"
      :default-index="defaultIndex"
    />
  </van-popup>
</template>

<script>
export default {
  name: 'GdwyyAppSuperPopup',
  props: {
    title: {
      type: String,
      default: '',
    },
    list: {
      type: Array,
      default: () => [],
    },
    value: {
      type: [Boolean, String],
      default: false,
    },
    defaultIndex: {
      type: [Number, String],
      default: '',
    },
  },
  data() {
    return {}
  },

  methods: {
    handleconfirm(val) {
      this.$emit('confirm', val)
      this.$emit('input')
    },
  },
}
</script>

<style lang="scss" scoped>
</style>